package TestDemo2;

public class Test1 {
    public static void main(String[] args) throws CloneNotSupportedException {
        Person person1 = new Person("张三");
        Person person2 = (Person) person1.clone();
        person2.name = "李四";
        System.out.println(person1);
        System.out.println(person2);
        System.out.println("======================");

        person2.m.money = 98.2;
        System.out.println(person1.m.money);
        System.out.println(person2.m.money);
    }
}
